﻿using System.Windows.Forms;
using System.ComponentModel;
using System;
using System.Drawing;

public class WaitMessageForm : Form
{
    private IContainer components;
    private Label label1;

    public WaitMessageForm()
    {
        this.InitializeComponent();
    }
    private void InitializeComponent()
    {
        ComponentResourceManager manager = new ComponentResourceManager(typeof(WaitMessageForm));
        this.label1 = new System.Windows.Forms.Label();
        this.SuspendLayout();
        // 
        // label1
        // 
        this.label1.AutoSize = true;
        this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
        this.label1.Location = new System.Drawing.Point(26, 26);
        this.label1.Name = "label1";
        this.label1.Size = new System.Drawing.Size(517, 20);
        this.label1.TabIndex = 0;
        this.label1.Text = "Please wait while the ASP.NET Development Server is started...";
        this.label1.UseWaitCursor = true;
        // 
        // WaitMessageForm
        // 
        this.AccessibleDescription = "ASP.NET Development server loader";
        this.AccessibleName = "Start Examples";
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
        this.AutoScaleDimensions = new SizeF(6f, 13f);
        this.AutoScaleMode = AutoScaleMode.Font;


        this.CausesValidation = false;
        this.ClientSize = new System.Drawing.Size(575, 70);
        this.ControlBox = false;
        this.Controls.Add(this.label1);
        this.FormBorderStyle = FormBorderStyle.None;
        this.Name = "WaitMessageForm";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        this.Text = "Loading...";
        this.UseWaitCursor = true;
        this.ResumeLayout(false);
        this.PerformLayout();

    }
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        Timer timer = new Timer();
        timer.Interval = 0xfa0;
        timer.Tick += new EventHandler(this.closeTimer_Tick);
        timer.Start();
    }
    private void closeTimer_Tick(object sender, EventArgs e)
    {
        ((Timer)sender).Stop();
        ((Timer)sender).Dispose();
        base.Close();
    }
    protected override void Dispose(bool disposing)
    {
        if (disposing && (this.components != null))
        {
            this.components.Dispose();
        }
        base.Dispose(disposing);
    }
    
}


